package com.ysh.many_to_many;

import com.ysh.domain.Course;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/*
     课程接口
 */
public interface CourseMapper {

    // 根据学生id查询所选课程
    @Select("select c.id,c.name from stu_cr sc, course c where sc.cid=c.id and sc.sid=#{id}")
    public abstract List<Course> selectBySid(Integer id);
}
